package cn.gcjxsc.runner;

import cn.gcjxsc.service.worker.FetchOrderQueueWorker;
import cn.gcjxsc.service.worker.FetchOrderWorker;
import cn.gcjxsc.service.worker.NotifyWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author pumbaa
 */
@Component
public class TaskRunner implements CommandLineRunner {
    @Autowired
    private FetchOrderQueueWorker orderQueueWorker;
    @Autowired
    private FetchOrderWorker fetchOrderWorker;
    @Autowired
    private NotifyWorker notifyWorker;
    @Override
    public void run(String... strings) {
        fetchOrderWorker.start();
        orderQueueWorker.start();
        notifyWorker.start();
    }
}
